/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package intmag;

import java.awt.Image;
import java.util.Objects;
import javax.swing.Icon;
import javax.swing.ImageIcon;

/**
 *
 * @author Den
 */
public class Goods {
    
    int id;
    String descriptoin;
      ImageIcon icon;
    double price;

    public Goods(int id, String descriptoin, ImageIcon icon, double price) {
        this.id = id;
        this.descriptoin = descriptoin;
        this.price = price;
    }

    

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 37 * hash + this.id;
        hash = 37 * hash + Objects.hashCode(this.descriptoin);
        hash = 37 * hash + Objects.hashCode(this.icon);
        hash = 37 * hash + (int) (Double.doubleToLongBits(this.price) ^ (Double.doubleToLongBits(this.price) >>> 32));
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Goods other = (Goods) obj;
        if (this.id != other.id) {
            return false;
        }
        if (!Objects.equals(this.descriptoin, other.descriptoin)) {
            return false;
        }
        if (!Objects.equals(this.icon, other.icon)) {
            return false;
        }
        if (Double.doubleToLongBits(this.price) != Double.doubleToLongBits(other.price)) {
            return false;
        }
        return true;
    }

    public int getId() {
        return id;
    }

    public String getDescriptoin() {
        return descriptoin;
    }

    public Icon getIcon() {
        return icon;
    }

    public double getPrice() {
        return price;
    }

    
    
    
    
    
    
}
